<?php

namespace app\admin\logic;
use think\Model;
class User extends Model{
    public function isAdmin($A,$P){
      $P = md5($P);  
        
      $ret = \think\Db::table('user')->where('count',$A)->where('password',$P)->select();
      if($ret){
          return true;
      }else{
          return false;
      }
    }
    
    public function addAdmin($A,$P){
       $P = md5($P); 
        
       $data = ['count'=>$A,'password'=>$P];
       \think\Db::table('user')->insert($data);
       
    }
}